package com.zhang.springcloud.service;

import com.zhang.springcloud.entities.CommonResult;
import com.zhang.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

@Service
@FeignClient(value = "cloud-payment-service")
public interface OrderFeignService {
    @GetMapping("/payment/select/{id}")
    CommonResult<Payment> select(@PathVariable("id") Long id);
    @PostMapping("/payment/add")
    CommonResult create(@RequestBody Payment payment);
    @GetMapping("/payment/feigntimeout")
    String getFeignTimeout();
}
